import { getSkuInfo, getSkuInfoHome } from '@/api/goods/reception'

const state = {
}

const mutations = {
}

const actions = {
  getSkuInfo({ commit }, skuId) {
    return new Promise((resolve, reject) => {
      getSkuInfo(skuId)
        .then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
    })
  },
  getSkuInfoHome({ commit }) {
    return new Promise((resolve, reject) => {
      getSkuInfoHome()
        .then(response => {
          resolve(response)
        }).catch(error => {
        reject(error)
      })
    })
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
